package cn.wolfcode.luowowo.search.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Document(indexName="luowowo_hotel",type="hotel")
@Getter
@Setter
public class HotelTemplate implements Serializable{
    @Id
    @Field(store=true, index = true,type = FieldType.Long)
    private Long id;
    @Field(store=true, index = true,type = FieldType.Long)
    private Long destId;
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String destName;
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String coverUrl;
    @Field(index=true,analyzer="ik_max_word",store=true,searchAnalyzer="ik_max_word",type = FieldType.Text)
    private String name;
    @Field(index=true,analyzer="ik_max_word",store=true,searchAnalyzer="ik_max_word",type = FieldType.Text)
    private String englishName;
    @Field(store=true, index = true,type = FieldType.Double)
    private double score;
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String img;
    @Field(index=true,analyzer="ik_max_word",store=true,searchAnalyzer="ik_max_word",type = FieldType.Text)
    private String address;
    @Field(store=true, index = true,type = FieldType.Integer)
    private int price;
    @Field(store=true, index = true,type = FieldType.Long)
    private Long regionId;

}